<?php
class Front_Controller extends Controller
{
	
	function __construct()
	{
		parent::__construct();	
		/*
		if(!is_login()) redirect('home');
		 * *
		 */
		// set theme
		$this->template->set_theme('front');
		
		// set layout
		$this->template->set_layout('layout');
		
		
		// set title
		//$lang = GetCurrLang();
		$title =  "km";
		$this->template->title($title);
		
		// Set js
		$this->template->append_metadata(js_notify());
		
		//--- guest log ---
		$this->load->model('home/guest_log_model','guest_log');
		$guestdata = $this->session->all_userdata();
		$guest_log = $this->guest_log->where('session_id = "'.$guestdata['session_id'].'"')->get();
		if(!$guest_log){
			$guestdata['created'] = date("Y-m-d H:i:s");
			$this->guest_log->save($guestdata);
		}
	}
	
}
?>